package com.cn.serverline.lineicp.productionLine.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 型号节点库异常
 *
 * @author Gmr
 * @since 2024/7/29
 */
@Getter
public enum ModelNodeLibraryException implements AbstractExceptionEnum {

	MODEL_NODE_CODE_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "01", "型号节点不存在"),
	MODEL_NODE_CODE_DUPLICATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "02", "型号节点重复"),
	MODEL_NODE_LIBRARY_ADD_NULL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "03", "型号节点新增参数不能空"),
	MODEL_NODE_LIBRARY_ID_NULL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "04", "节点库ID不能为空"),
	MODEL_NODE_LIBRARY_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "05", "节点库不存在"),
	PLAN_NAME_DUPLICATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "06", "预案名称重复"),
	DEFAULT_DEL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "07", "默认节点不可删除");

	/**
	 * 异常编码
	 */
	private final String errorCode;

	/**
	 * 异常提示
	 */
	private final String userTip;

	ModelNodeLibraryException(String errorCode, String userTip) {
		this.errorCode = errorCode;
		this.userTip = userTip;
	}
}
